package com.yanjue.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yanjue.common.entity.HotSearchWord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author yanju
* @description 针对表【hot_search_word(热搜词配置)】的数据库操作Mapper
* @createDate 2025-01-16 12:33:44
* @Entity com/yanjue/common.entity.HotSearchWord
*/
@Mapper
public interface HotSearchWordMapper extends BaseMapper<HotSearchWord> {

    /**
     * 获取热搜词
     * @param size
     * @return
     */
    @Select("SELECT name FROM hot_search_word order by frequency desc limit #{size}")
    List<String> getHotSearchWordList(@Param("size") Integer size);
}




